#include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	long long a, b, sum = 0;
	a = 1;
	b = 2;
	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}
	if (n == 2) {
		cout << 2 << endl;
		return 0;
	}
	for (int i = 3; i <= n; i++) {
		sum = a + b;
		a = b;
		b = sum;
	}
	cout << sum << endl;
	return 0;
}